import java.util.Scanner;

public class Homework_603_5 {
	public static void main(String[] args) {
		// 5:求一个正整数 倒转后加上1024的结果.比如 12345倒转后是54321,加上1024，结果是55345.
		int a;
		Scanner input = new Scanner(System.in);
		do {
			System.out.println("请输入一个正整数：");
			a = input.nextInt();
		} while (a <= 0);
		
		int b =a;
		int c=0;
		while (b>0) {
			c=c*10+b%10;
			b /= 10;
		}
		c+=1024;
		System.out.println("结果是"+c);
		}
	}
